fix: CI baseline follow-up — replay focus misfire, BUILD_MODE leak, PATH precedence#14
Merged
Merged
Conversation
…ATH precedence - pageActivationObservable: ignore element-level focus/blur captured at window; only window-targeted events indicate page (de)activation. Fixes spurious view_change full snapshots when moving focus between inputs (broke recorder masking e2e). - ci.yml: scope BUILD_MODE=release to the bundle build step so script tests run in dev mode as their specs expect. - scripts/cli: prepend node_modules/.bin to PATH so repo-pinned tsc wins over globally installed versions on CI runners. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rumViewEvents[1] is order-dependent: a view emits several update events and custom_timings only appear on later updates, which made the assertion flaky on CI. Resolve views by id and assert on the update with the highest document_version, like the manually-tracked scenario. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PR #13 was merged with three CI jobs red. This fixes all three root causes.
Changes
createPageActivationObservablelistens for focus/blur onwindowwithcapture: true, which also receives element-level focus/blur (they don't bubble but are captured). Moving focus between two inputs was misread as a page deactivate→reactivate cycle, producing a spuriousview_changesegment with a full snapshot — this broke the recorder masking scenarios and would also fire for real users tabbing through forms. Now only window-targeted focus/blur count.BUILD_MODE: releasemadetest:scriptresolveSDK_VERSIONto the package version instead ofdev, failing 4 upload-source-maps specs. Scoped to the bundle build step.scripts/cliappendednode_modules/.binto PATH, so the runner's global TypeScript 6.x shadowed the repo-pinned 5.8.3 and emitted TS5107 deprecation errors. Now prepended.Test instructions
yarn test:unit --single-run→ 2652 SUCCESSyarn test:e2e:ci→ 444 passedBUILD_MODE=release yarn test:scriptfailure reproduced locally pre-fix; workflow now scopes the variablescripts/cli typecheck test/apps/vanillapasses with repo tsc 5.8.3🤖 Generated with Claude Code